# 计算器
while True:
    str_a = input('请输入数字1：')
    if str_a.isdigit():
        a = int(str_a)
        break
    else:
        print('输入格式不对，请输入数字!')
while True:
    str_b = input('请输入数字2：')
    if str_b.isdigit():
        b = int(str_b)
        break
    else:
        print('输入格式不对，请输入数字!')
while True:
    mark = input('请输入运算符：')
    if mark in "+-*/":
         break
    else:
        print('输入格式不对，请输入运算符!')
if mark == '+':
    print(f"{a} + {b} = {a + b}")
elif mark == '-':
    print(f"{a} - {b} = {a - b}")
elif mark == '*':
    print(f"{a} * {b} = {a * b}")
elif mark == '/':
    print(f"{a} / {b} = {a / b}")